export const flatMenuList = (menuData) => {
  let flatData = [];
  function flatTreeData(data) {
    data.map((item) => {
      flatData.push({
        icon: item.source,
        name: item.name,
        path: item.path
      });
      if (item.children && item.children.length > 0) {
        flatTreeData(item.children);
      }
    });
  }
  flatTreeData(menuData);
  return flatData;
};
